<?php
	$tel=$_REQUEST['tel'];
	$money=$_REQUEST['money'];
	$time=$_REQUEST['time'];
	$con=mysqli_connect('localhost', 'root', '', 'friday');
	if($con){
		mysqli_set_charset($con,'utf8');
      $sql="insert into accountstate (money,telphone,time) values ('{$money}','{$tel}','{$time}')";
       $result=mysqli_query($con,$sql);    
	   $sql4="select money from accountstate where telphone='{$tel}' ";
	   $result4=mysqli_query($con,$sql4);
	   $arr2=mysqli_fetch_all($result4,MYSQLI_ASSOC);
	   $str=json_encode($arr2);
	   echo $str;	
	}else {
		echo "链接未遂".mysqli_connect_error();
	}
	
	mysqli_close($con);

	?>